<?php
/**
 * Created by PhpStorm.
 * User: peter
 * Date: 2018/9/10
 * Time: 下午1:35
 */

namespace app\model;


class MemberLoginToken extends Base
{
    protected $pk = 'uid';
    // 此处表名请务必设置为public
    public $table = 'member_login_token';

    /**
     * @purpose 管理用户表模型
     * @return \think\model\relation\HasOne
     */
    public function userinfo ()
    {
        $fields = 'uuid,mobile,username,nickname,avatar,balance,frozen,invitation,invitation_from,sex';
        return $this->hasOne('Member', 'uid', 'uid')
            ->bind($fields);
    }
}